upgrade/systemvm: add template zone entries#5642
Conversation
Fixes apache#5641 When registering a system VM template during an upgrade, entries in cloud.template_zone_ref must be created for the new template. For a cross-zones template, entry for each zone must be added. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
@blueorangutan package |
1 similar comment
|
@blueorangutan package |
|
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1635 |
|
@blueorangutan test matrix |
|
Manual upgrade testing required from 4.14, 4.15 to this PR's pkgs cc @nvazquez @borisstoyanov @vladimirpetrov @sureshanaparti |
|
@blueorangutan test matrix |
|
@rhtyd a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2492)
|
|
Trillian test result (tid-2491)
|
|
Trillian test result (tid-2493)
|
weizhouapache
left a comment
There was a problem hiding this comment.
code lgtm
did not test it
|
There seems to be some issue even after changes, getting an exception on upgrade, Looking into it. |
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
@blueorangutan package |
|
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1645 |
|
@nvazquez @weizhouapache @rhtyd
@blueorangutan test matrix |
|
@blueorangutan test matrix |
|
@shwstppr a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java
Show resolved
Hide resolved
engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java
Show resolved
Hide resolved
| templateZoneVO = new VMTemplateZoneVO(zoneId, templateId, new java.util.Date()); | ||
| templateZoneVO = vmTemplateZoneDao.persist(templateZoneVO); | ||
| } else { | ||
| templateZoneVO.setRemoved(GenericDaoBase.DATE_TO_NULL); |
There was a problem hiding this comment.
I think, no need to explicitly set removed to null (the record retrieved using findByZoneTemplate() already has removed null)
| templateZoneVO = null; | ||
| } | ||
| } | ||
| return templateZoneVO; |
There was a problem hiding this comment.
this returned templateZoneVO is unused, and only being validated for null. I think, it is better through the exception when the update fails.
There was a problem hiding this comment.
Don't think it affects functionality
There was a problem hiding this comment.
Don't think it affects functionality
correct, doesn't affect functionality. it's about the implementation. returning VMTemplateZoneVO is not required in this method.
|
Trillian test result (tid-2499)
|
|
Trillian test result (tid-2500)
|
|
Trillian test result (tid-2498)
|
vladimirpetrov
left a comment
There was a problem hiding this comment.
LGTM based on manual testing, tested upgrades from:
4.14.1 KVM CentOS 7, 2 zones
4.14.1 VMWare 6.7, 2 zones
4.14.1 XCP-NG 8.2, 1 zone
4.15.2 KVM CentOS 7, 1 zone
4.15.2 VMWare 6.7, 2 zones
4.15.2 XCP-NG 8.2, 2 zones
Description
Fixes #5641
When registering a system VM template during an upgrade, entries in
cloud.template_zone_refmust be created for the new template.For a cross-zones template, an entry for each zone must be added.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?